home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / Fireworks 3 / Settings / HTML Code / GoLive / ServerMap.mtt next >
Encoding:
Text File  |  1999-11-19  |  1.1 KB  |  38 lines

  1. write("# This map file needs to be placed on a server in a directory with a CGI\n");
  2. write("# Application capable of interpreting the Image Map information.  If you\n");
  3. write("# are unsure about this, contact your web site administrator.\n");
  4.  
  5. write("\n");
  6.  
  7. var imagemap = slices[0][0].imagemap;
  8. if (imagemap) {
  9.     var i = 0;
  10.     while (i < imagemap.numberOfURLs) {
  11.         var curImagemap = imagemap[i];
  12.         write(curImagemap.shape); // Shapes are rect poly and circle
  13.         write(" ", curImagemap.href, " ");
  14.         for (var j=0; j<curImagemap.numCoords; j++) {
  15.             if (j>0) write(" ");
  16.             // polygon has n coords.
  17.             // rect has 2 coords, topLeft, and botomRight.
  18.             // Circle has one coord, center.
  19.             write(curImagemap.xCoord(j), ",", curImagemap.yCoord(j)); 
  20.         }
  21.         if (curImagemap.shape == "circle") {
  22.             // write the radius.
  23.             write(" ", curImagemap.radius);
  24.         }
  25.         write("\n");
  26.         i++;
  27.     } 
  28.     if (exportDoc.hasBackgroundLink) {
  29.         var curImagemap = exportDoc.backgroundLink;
  30.         if (curImagemap.href) {
  31.             write("default ", curImagemap.href, "\n");
  32.         }
  33.     }
  34. }    
  35.  
  36. write("\n# This Image Map was created with Macromedia Fireworks 3.0\n");
  37. write("# http://www.macromedia.com\n");
  38.